home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / September 96 / Re Dialog validation & notific < prev    next >
Encoding:
Internet Message Format  |  1996-09-19  |  1.4 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Dialog validation & notification
  2. Sent:        9/18/96 4:08 PM
  3. Received:    9/18/96 4:08 PM
  4. From:        kswenson@keypress.com (Kirk Swenson)
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List
  7.  
  8.  
  9. >I have started using the view architecture to implement my dialogs, and it
  10. >is well implemented. The one thing I found missing however, is a lack of
  11. >validation and/or notification mechanism when the user exits edit views via
  12. >tabbing, clicking and okaying the dialog. Is this feature going to be a
  13. >part of ODF2? Or is there something I need to implement myself to handle
  14. >this problem?
  15.  
  16. I worked around this limitation by creating a derived class of FW_CEditView
  17. (KCP_CEditViewNotifier) which overrides DeactivateTarget() to notify its
  18. dependents whenever it ceases to be the target.  One could also override
  19. ActivateTarget() to cache a copy of the text and then only notify in
  20. DeactivateTarget() if the text actually changed.  The required code is
  21. straightforward, but I can send it to you if desired (or post it if there
  22. is wider interest).  FW_CEditView already inherits from FW_MNotifier, which
  23. suggests that the ODF team was intending to add notification but didn't get
  24. around to it.  ODF 2 may well make this workaround obsolete in the next
  25. week.
  26.  
  27. Kirk Swenson
  28. Senior Software Engineer
  29. Key Curriculum Press
  30. kswenson@keypress.com